/*    */ package com.zimbra.cs.redolog.op;
/*    */ 
/*    */ import com.zimbra.cs.mailbox.Mailbox;
/*    */ import com.zimbra.cs.mailbox.MailboxManager;
/*    */ import com.zimbra.cs.mailbox.MailboxOperation;
/*    */ import com.zimbra.cs.redolog.RedoLogInput;
/*    */ import com.zimbra.cs.redolog.RedoLogOutput;
/*    */ import java.io.IOException;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class DismissCalendarItemAlarm
/*    */   extends RedoableOp
/*    */ {
/*    */   private int mId;
/*    */   private long mDismissedAt;
/*    */   
/*    */   public DismissCalendarItemAlarm()
/*    */   {
/* 34 */     super(MailboxOperation.DismissCalendarItemAlarm);
/* 35 */     this.mId = 0;
/*    */   }
/*    */   
/*    */   public DismissCalendarItemAlarm(int mailboxId, int id, long dismissedAt) {
/* 39 */     this();
/* 40 */     setMailboxId(mailboxId);
/* 41 */     this.mId = id;
/* 42 */     this.mDismissedAt = dismissedAt;
/*    */   }
/*    */   
/*    */   protected String getPrintableData() {
/* 46 */     StringBuilder sb = new StringBuilder("id=");
/* 47 */     sb.append(this.mId).append(", dismissedAt=").append(this.mDismissedAt);
/* 48 */     return sb.toString();
/*    */   }
/*    */   
/*    */   protected void serializeData(RedoLogOutput out) throws IOException {
/* 52 */     out.writeInt(this.mId);
/* 53 */     out.writeLong(this.mDismissedAt);
/*    */   }
/*    */   
/*    */   protected void deserializeData(RedoLogInput in) throws IOException {
/* 57 */     this.mId = in.readInt();
/* 58 */     this.mDismissedAt = in.readLong();
/*    */   }
/*    */   
/*    */   public void redo() throws Exception {
/* 62 */     int mboxId = getMailboxId();
/* 63 */     Mailbox mailbox = MailboxManager.getInstance().getMailboxById(mboxId);
/* 64 */     mailbox.dismissCalendarItemAlarm(getOperationContext(), this.mId, this.mDismissedAt);
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/redolog/op/DismissCalendarItemAlarm.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */